find palindrome of a string in python compiler